#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define lld long long
#define ENDL '\n'
#define LOG(var) std::cout << #var << " = " << (var) << ENDL
using std::cin;
using std::cout;
using std::string;
using std::vector;

void solve() {
  int n, m;
  int ans = -1;
  cin >> n >> m;
  vector<int> s(n);
  for (auto &pos : s)
    cin >> pos;
  // std::sort(s.begin(), s.end());
  if (s[1] != 1) {
    cout << ans << ENDL;
    return;
  }

  int pos = 0, r = 0, cnt = 0;
  while (r < m) {
    while (pos < n and s[pos] <= r + 1) {
      pos += 1;
    }
    pos--;

    if (pos == n - 1) {
      int k = std::ceil((m - r) / s[pos]);
      cnt += k;
      r += k * s[pos];
      break;
    } else {
      int add = std::min(s[pos + 1] - 1, m);
      int k = (add - r + s[pos] - 1) / s[pos];
      cnt += k;
      r += k * s[pos];
      pos++; // 移动到下一个
    }
  }
  cout << cnt << ENDL;
}

int main() {
  int T = 1;
  cin >> T;

  while (T--) {
    solve();
  }
  return 0;
}